import networkx as nx
import matplotlib.pyplot as plt
G = nx.DiGraph()
G.add_nodes_from([0,1,2])
G.add_edges_from([(0,1),(1,2),(3,4)])
nx.draw_networkx(G,)
plt.show()